using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class web_pages_ajax_list_chuc_danh : System.Web.UI.Page
{
    public DataTable dtt;
    public bool root = false;
    public string id_cha = "NULL";
    protected void Page_Load(object sender, EventArgs e)
    {
        Common comm = new Common();

        string tp_id = Request.QueryString["id"];
        string sqlComm = "";

        if (tp_id.Trim().Equals("NULL"))
        {
            root = true;
            sqlComm = "Select ma_chuc_danh, ten_chuc_danh,ma_chuc_danh_cha,nut_la from DanhMuc_chuc_danh where muc = 0 ";
        }
        else
        {
            id_cha = ViecLamTrong.getChucDanhCha(tp_id);
            sqlComm = "Select ma_chuc_danh, ten_chuc_danh,ma_chuc_danh_cha,nut_la from DanhMuc_chuc_danh where  ma_chuc_danh_cha = '" + tp_id + "' ";
        }
        dtt = comm.getDataTable(sqlComm);
    }
}
